﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TweetMemeNET
{
    /// <summary>
    /// Contains result set for a URL info call, such as title, number of retweets and number of comments
    /// </summary>
    public class TweetMemeCallUrlInfo : TweetMemeCallBase
    {
        public TweetMemeCallUrlInfo(string siteUrl)
            : base(siteUrl)
        {

        }

        protected override string GetTweetMemeApiUrl()
        {
            return string.Format(TweetMemeConstants.URL_BASE_URL_INFO, SiteURL);
        }

        protected override ITweetMemeResult HandleResult(string xmlResult)
        {
            TweetMemeResultUrlInfo result = new TweetMemeResultUrlInfo(xmlResult);

            Result=result;

            return result;
        }

        /// <summary>
        /// Gets TweetMeme statistics for a specific URL
        /// </summary>
        public new TweetMemeResultUrlInfo Result
        {
            get
            {
                return (TweetMemeResultUrlInfo)base.Result;
            }
            protected set
            {
                base.Result = (ITweetMemeResult)value;
            }
        }
    }
}
